package ebj.common.io.file;

import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;

public class CopyFilesToDestDir {
    public static void main(String[] args) throws IOException {
        String datsSourcesFilePath = "file_paths.txt";
        String targetDir = "F:/06-kerberos/zxy-tmp/jars/";
        Path path = Paths.get(datsSourcesFilePath);
        System.err.println(path.toFile().getAbsolutePath());
        List<String> pathList = Files.readAllLines(path);
        for (String pth : pathList) {
            File file = new File(pth);
            Files.copy(Paths.get(pth), Paths.get(targetDir + file.getName()));
        }
    }
}

// javac -cp jars/commons-cli-1.3.1.jar:jars/compress-lzf-1.0.2.jar:jars/elasticsearch-2.3.3.jar:jars/guava-18.0.jar:jars/HdrHistogram-2.1.6.jar:jars/hppc-0.7.1.jar:jars/jackson-core-2.6.6.jar:jars/jackson-dataformat-cbor-2.6.6.jar:jars/jackson-dataformat-smile-2.6.6.jar:jars/jackson-dataformat-yaml-2.6.6.jar:jars/joda-convert-1.2.jar:jars/joda-time-2.8.2.jar:jars/jsr166e-1.1.0.jar:jars/lucene-analyzers-common-5.5.0.jar:jars/lucene-backward-codecs-5.5.0.jar:jars/lucene-core-5.5.0.jar:jars/lucene-grouping-5.5.0.jar:jars/lucene-highlighter-5.5.0.jar:jars/lucene-join-5.5.0.jar:jars/lucene-memory-5.5.0.jar:jars/lucene-misc-5.5.0.jar:jars/lucene-queries-5.5.0.jar:jars/lucene-queryparser-5.5.0.jar:jars/lucene-sandbox-5.5.0.jar:jars/lucene-spatial3d-5.5.0.jar:jars/lucene-spatial-5.5.0.jar:jars/lucene-suggest-5.5.0.jar:jars/netty-3.10.5.Final.jar:jars/securesm-1.0.jar:jars/snakeyaml-1.15.jar:jars/spatial4j-0.5.jar:jars/t-digest-3.0.jar: TestBulkCreateindex.java
// java -cp jars/commons-cli-1.3.1.jar:jars/compress-lzf-1.0.2.jar:jars/elasticsearch-2.3.3.jar:jars/guava-18.0.jar:jars/HdrHistogram-2.1.6.jar:jars/hppc-0.7.1.jar:jars/jackson-core-2.6.6.jar:jars/jackson-dataformat-cbor-2.6.6.jar:jars/jackson-dataformat-smile-2.6.6.jar:jars/jackson-dataformat-yaml-2.6.6.jar:jars/joda-convert-1.2.jar:jars/joda-time-2.8.2.jar:jars/jsr166e-1.1.0.jar:jars/lucene-analyzers-common-5.5.0.jar:jars/lucene-backward-codecs-5.5.0.jar:jars/lucene-core-5.5.0.jar:jars/lucene-grouping-5.5.0.jar:jars/lucene-highlighter-5.5.0.jar:jars/lucene-join-5.5.0.jar:jars/lucene-memory-5.5.0.jar:jars/lucene-misc-5.5.0.jar:jars/lucene-queries-5.5.0.jar:jars/lucene-queryparser-5.5.0.jar:jars/lucene-sandbox-5.5.0.jar:jars/lucene-spatial3d-5.5.0.jar:jars/lucene-spatial-5.5.0.jar:jars/lucene-suggest-5.5.0.jar:jars/netty-3.10.5.Final.jar:jars/securesm-1.0.jar:jars/snakeyaml-1.15.jar:jars/spatial4j-0.5.jar:jars/t-digest-3.0.jar: TestBulkCreateindex
